<div class="row">
  <div class="col"></div>
  <div class="col-lg-6">
    <div class="card">
      <div class="card-header"><%= gettext "Register" %></div>
      <div class="card-body">
        <%= form_for @changeset, join_path(@conn, :create), fn f -> %>
          <%= if @changeset.action do %>
            <div class="alert alert-danger">
              <p>Oops, something went wrong! Please check the errors below.</p>
            </div>
          <% end %>
          <div class="form-group">
            <%= text_input f, :username, class: "form-control", required: true, placeholder: "Username", tabindex: 1 %>
            <%= error_tag f, :username %>
          </div>
          <div class="form-group">
            <%= text_input f, :email, class: "form-control", required: true, placeholder: "Email", tabindex: 2 %>
            <%= error_tag f, :email %>
          </div>
          <div class="form-group">
            <%= password_input f, :password, class: "form-control", required: true, placeholder: "Password", tabindex: 3 %>
          </div>
          <div class="form-group">
            <div class="input-group">
              <input class="form-control input-lg" placeholder="验证码" name="_excaptcha" type="text" autocorrect="off" autocapitalize="off" pattern="[a-zA-Z]*" maxlength="5" autocomplete="off">
              <span class="input-group-addon input-group-captcha"><a class="excaptcha-image-box" href="#"><img class="excaptcha-image" src="<%= session_path(@conn, :excaptcha) %>"></a></span>
            </div>
          </div>
          <div class="form-group text-center">
            <%= submit class: "btn btn-primary btn-block btn-lg", tabindex: 4 do %>
              <i class="fa fa-sign-in" aria-hidden="true"></i>
              <span><%= gettext "Register" %></span>
            <% end %>
          </div>
        <% end %>
      </div>
    </div>
  </div>
  <div class="col"></div>
</div>
